<?php
/** Unit test utility package */

class UnitTest {
  function UnitTest() { // use php4 for compatibility
    foreach(get_class_methods($self) as $method) {
      if( strpos( 'test', $method ) === 0 )
        echo call_user_func( array($self, $method) );
    }
  }

  function isEqual( $a, $b, $name ) {
    if( $a == $b )
      return true;

    echo $name;
    return false;
  }

  function isTrue( $bool, $name ) {
    if( $bool ) 
      return true;

    echo $name;
    return false;  
  }

  function isFalse( $bool, $name ) {
    if( !$bool ) 
      return true;

    echo $name;
    return false;
  }
}

?>
